home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / cbm / 1571 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.8 KB

  1. Path: mail2news.demon.co.uk!PRIMDOM-Message_Server
  2. From: mello.med@shands.ufl.edu
  3. Newsgroups: comp.sys.cbm
  4. Subject: CHRGET routine on the C=64
  5. Date: Wed, 31 Jan 1996 07:37:08 -0500
  6. Message-ID: <s10f1bfd.037@shands.ufl.edu>
  7. X-NNTP-Posting-Host: PRIMDOM-Message_Server
  8. X-Mailer: WordPerfect Office 4.0
  9. X-Mail2News-Path: shands.ufl.edu!PRIMDOM-Message_Server
  10.  
  11. I want to incorporate some of my own routines into BASIC.  The
  12. C=64 Programmer Reference Guide is not much help.  This is all I
  13. could find on it:
  14.  
  15. CHRGET routine is used by BASIC to get each character/token. 
  16. This makes it simple to add new BASIC commands....  A common way
  17. to use this method is to specify a character (@ for example)
  18. which will occur before any of the new commands.  The new CHRGET
  19. routine will search for the special character.  If none if
  20. present, control is passed to the normal BASIC CHRGET routine. 
  21. If the special character is present, the new command is
  22. interpreted and executed by your machine language program.  This
  23. minimizes the extra execution time added by the need to search
  24. for additional commands.  This technique is often called a wedge.
  25.  
  26. Now, I understand this means that when you RUN a program, CHRGET
  27. will search the BASIC RAM and look for your special symbol in
  28. addition to all the regular commands.  Is this a correct
  29. assumption?  My question is:   (1) How do I change the vector
  30. from the normal CHRGET routine to point to my CHRGET routine to
  31. search through RAM for my @ of whatever else it will be.  (2)
  32. Where in memory do I store my CHRGET routine and the routine
  33. after the @ to be executed.  
  34.  
  35. Any help with this problem would be greatly appreciated :-)
  36.  
  37. If you could please respond by e-mail to mello.med@shands.ufl.edu
  38. because I don't have access to a newsreader as of yet.
  39.  
  40. Thanks
  41.  
  42. Steve M.
  43.  
  44.  
  45.